package com.wushijia.datastructure;

public class Matrix_ex
{
    public static void main(String args[])
    {
        int m1[][]={{1,2,3},
                    {4,5,6}};
        Matrix a=new Matrix(m1); 
        
        int m2[][]={{1,0,0},
                    {0,1,0}};
        Matrix b=new Matrix(m2);
         
        int m3[][]={{1,0,6},
        			{0,2,0},
                    {0,0,3}};
        Matrix c=new Matrix(m3);
    
        System.out.print("Matrix a:\n"+a.toString());
        System.out.print("Matrix b:\n"+b.toString());
        System.out.print("Matrix c:\n"+c.toString());
        
        Matrix d1=a.add(b);
        System.out.print("a+b=\n"+d1.toString());
         
        Matrix d2=a.transpose();
        System.out.print("a.transpose()=\n"+d2.toString());
 
    
        Matrix d3=a.multiply(c);
        System.out.print("a*c=\n"+d3.toString()); 
          
        System.out.println(c.isSymmetricMatrix()); 
         
        System.out.println(c.isUpperTriangularMatrix()); 
        
        System.out.println(a.equals(b));
    }
}
